<?php
// +----------------------------------------------------------------------
// | Copyright (c) 2012 HongPing All rights reserved.
// +----------------------------------------------------------------------
// | ActionName:往来单位管理
// +----------------------------------------------------------------------
// | Author: HongPing <hongping626@qq.com>
// +----------------------------------------------------------------------
class ContactsAction extends CommonAction {
	function _filter(&$map){
        //$map['id'] = array('egt',2);
        if($_POST['selectname']){
            $map['comname|egname|compcode|contname|taxnumber|faxnumber|phone|mobile|email|qqmsn|bankinfo|bisinfo|address|remarks'] = array('like',"%".$_POST['selectname']."%");
        }
        if($_POST['contatype']){
            $map['contatype'] = $_POST['contatype'];
        }
	}
    
    function viewCont(){
     $listM = M('Contacts');
     $map['id'] = $_REQUEST['id'];
     $list = $listM->where($map)->find();
     $this->assign('vo',$list);
     $this->display();   
    }
 
}
?>